home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
comms_w
/
wrcprs14.zip
/
RSH.DOC
< prev
next >
Wrap
Text File
|
1995-01-17
|
7KB
|
190 lines
Winsock RSH Version 1.4
Copyright 1994 Denicomp Systems
All rights reserved
DESCRIPTION
-----------
Winsock RSH executes a command on a remote host and displays the
results on your PC's screen or stores the output in a file. It is
similar to the Unix utility of the same name.
The remote host must be a system running the rshd server process
(i.e. a Unix system). You cannot execute a command on another PC,
for example.
Any output from the remote command will be displayed in the Winsock
RSH window. The output includes both the standard output and the
standard error output of the command executed. This can be redirected
to a file using the -r option.
IMPORTANT! You cannot use Winsock RSH to execute an interactive remote
command. If you need to execute an interactive command on the remote host,
you must use a utility like Telnet.
REQUIREMENTS
------------
Winsock RSH requires a PC running Windows 3.1 or higher and a Windows
Sockets compatible TCP/IP stack.
SYNTAX
------
rsh Host [ -l User ] [-m] [-w] [-r File ] { Command | @File }
PARAMETERS
----------
Host The host name of the remote host on which the command is
to be executed.
Command The command to execute. If the command contains special
characters that are interpreted by a command shell, you
must enclose the command inside double quotes (" ").
NOTE: Winsock RSH will not expand wildcard characters to
match filenames on the local PC, so these do not need to
be enclosed in quotes.
@File Instead of specifying the Command on the command line, you
can store the command to execute in a file. If this parameter
begins with the at-sign (@), the command is read from the
filename following it. (Do not put any spaces between the @
and the filename.) Since the length of the MS-DOS command
line is limited, you can specify longer commands (up to 2048
characters*) by storing them in a file.
* - assuming the remote host allows commands this long
FLAGS
-----
-l User Specifies that Winsock RSH should log in to the remote
host as the user specified by the User variable instead of
the local user name. If this flag is not specified, the
local and remote user names are the same.
-r File Redirects any output from Winsock RSH to the File instead
of displaying it on the screen.
-m *Run Minimized. Normally, Winsock RSH will display a window
showing the output of the command executed and any possible error
messages. With -m, Winsock RSH will only display a minimized
icon while running. This is useful for software developers who
wish to transparently call Winsock RSH from within their software.
-w Wait for the Return key after the command completes. This allows
you to see the output of the command before the window is closed
when the command completes. It will display "Press Return:"
and wait for you to press Return. Before pressing Return, you
can use the scrollbars to review any scrolled lines.
* - This option is available only in the registered version.
If you do not specify the -l flag, the local user name is used at the
remote host. If -l User is entered, that user name is used at the remote
host.
The local user name is determined by first looking in the file WIN.INI
in the Windows directory. If this file contains a section named "[RSH]"
and contains an entry named "User" in that section, the name specified
there will be used as the local user name. For example, WIN.INI would
contain:
[RSH]
User=joe
If this appeared in WIN.INI, the local user name would be "joe" and Winsock
RSH would use this name at the remote host.
If this section does not appear in WIN.INI, Winsock RSH uses the Computer
Name specified in the Windows for Workgroups Network Setup (found on the
Control Panel). This name is converted to lowercase characters and Winsock
RSH uses this name at the remote host. Therefore, if no user name is
specified in WIN.INI, the Computer Name of the PC must be set up as a
valid user on the remote host, in addition to being included in the
remote host's /etc/hosts.equiv file.
(If you are not using Windows for Workgroups and your network does not
provide the services that Windows for Workgroups provides, you must use
WIN.INI to specify the user name.)
SECURITY
--------
The remote host allows access only if at least one of the following
conditions is satisfied:
* The name of the local host is listed as an equivalent host in the
/etc/hosts.equiv file on the remote host.
The method of specifying the local host name is determined by the
particular TCP/IP stack you are using.
* If the local host is not in the /etc/hosts.equiv file, the user's home
directory on the remote host must contain a .rhosts file that lists the
local host and user name.
* The user's login on the remote host does not require a password.
The .rhosts file in the user's home directory must be owned by either
the user specified or root, and only the owner should have read and write
access.
EXAMPLES
--------
* To display the users logged in to a remote host, use:
rsh remhost who
The list of users is displayed in the RSH window on your PC. As you see,
the window is closed when the command ends, so this command is not very
useful. Try this:
rsh -w remhost who
This will list the users on the remote host, then wait for you to press
the Return key before closing the window. If the list of users scrolled
the window, you can use the scrollbars to view the scrolled information.
* To list the files in the /usr directory ending with .txt on the remote
host, use:
rsh -w remhost ls /usr/*.txt
The files in the /usr directory are displayed in the Winsock RSH window.
Again, the -w option is used to wait for the Return key so you can see the
results.
* This lists the contents of the /usr directory on the remote host and
stores it in the file "usrfiles.txt" on your PC. We will run the command
minimized so the RSH window does not display:
rsh -m -r \lists\usrfiles.txt remhost ls /usr
The file "usrfiles.txt" will contain the list of files in /usr.
SUPPORT
-------
Support is available via U.S. Mail and Compuserve/Internet.
Denicomp Systems
P.O. Box 731
Exton, PA 19341
Compuserve: 71612,2333
Internet: 71612.2333@compuserve.com